package zuo;

public class Shuzu02 {
    public static void main(String[] args) {
        int x[]={4,5,67,8,9,4,4};
        int y[]={4,5,67,8,9,4,4};
        boolean bma=bibi(x,y);
        if(bma){
            System.out.println("数组完全相同");
        }else {
            System.out.println("数组不完全相同");
        }

    }
    public static boolean bibi(int a[],int b[]) {
        boolean cha = true;
        if (a.length != b.length) {//先进行数值个数比较
            System.out.println("数组不完全相同");
        } else {
            for (int i = 0; i < a.length; i++) {
                if (a[i] != b[i]) {   //通过循环对每一位数进行比较
                    cha = false;
                }
            }
        }
     return  cha;
    }

}
